package com.netcracker.training.automonic.dao.entities;

import java.sql.Date;

/**
 * One of object properties that change often.
 * 
 * <p>Each statistics has type that describes substance of statistics.
 * 
 * @author Vadim Gidulyan
 * 
 * @see Object
 * @see StatsType
 */

public interface Statistics
{

	/**
	 * Returns time when this statistics was collected.
	 * 
	 * @return time when this statistics was collected
	 */
	Date getTime();
	
	/**
	 * Returns object that have this statistics.
	 * 
	 * @return object that have this statistics
	 */
	Object getObject();
	
	/**
	 * Returns type of the statistics.
	 * 
	 * @return type of the statistics
	 */
	StatsType getType();
	
	/**
	 * Returns the statistics value.
	 * 
	 * @return statistics value
	 */
	String getValue();
	
	/**
	 * Sets the statistics value.
	 * 
	 * @param value statistics value. Length of string must not exceed 255 
	 * symbols
	 */
	void setValue(String value);
	
	/**
	 * Saves object to database.
	 */
	void save();

}
